<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<script type="text/javascript" src="libs/jquery-1.11.0.js"></script>
		<script type="text/javascript" src="pub/JSCommonUtil.js"></script>
		<title>基本测试cal</title>
	</head>
	
	<body>
	<style type="text/css">
		.abc{color:#CC0000}
	</style>
	<p>jc-cal-* 用来动态更改dom属性</p>
		<h2>
		<h2>input check 基本测试</h2>
		<div id='father1'></div>
		<h2>input check 基本测试 和上一个结果相反 </h2>
		<div id='father2'></div>
		<h2> cal repeat 混合测试1</h2>
		<div id='father3'></div>
		
		<div id='father4'></div>
		<h2> cal repeat 混合测试2 + defaultVal</h2>
		<div id='father5'></div>
		<p>上面的undefined是未做默认值处理产生的问题</p>
		<h2>不带cal标签的测试  jc-value jc-class ...  注意:请不要使用jc-id标签,否则报错</h2>
		<div id='father6'></div>
		<p>不让用jc-id目的是防止将数据加载到id上，这样在开发中可能会造成意想不到的选择器问题</p>
		<p>如果定义两个jc-value ,会覆盖掉其中的一个，如果定义 两个jc-class，class之间不会被覆盖掉，为了以后兼容性考虑，最好 这样用jc-class<br/>  jc-class-1 jc-class-2</p>
		
		<!-- 33{{new Date|filter}}33 -->
		<!-- {{a.b}} -->
		<script type="text/javascript">
		var session={};
		$(function(){
				jc.render({input:'正确','checked':true},"test_cal_1",$('#father1'),function(){
				console.log("OK");
			})

		})
		$(function(){
			jc.render({},"test_cal_1",$('#father2'),function(){
				console.log("OK");
			})
		})

		$(function(){
			jc.render({elements:[
				{
					class:"abc",
					a:"红色字体"
				},
				{
					class:"",
					a:"黑色字体"
				},
				{
					class:"abc",
					a:"红色字体"
				}
				]},"test_cal_2",$('#father3'),function(){
				console.log("father3 OK");
			})
		})


		$(function(){
			var data1 ={a:[{input:'input 1'},{input:'input 2'}]}
			jc.render(data1,"test_cal_3",$('#father4'),function(){
				console.log("father4 OK");
			})
			var data2 ={a:[{input:'input 1'},{}]}
			jc.render(data2,"test_cal_3",$('#father5'),function(){
				console.log("father5 OK");
			})
		})

		$(function(){
			var data={class:'abc',value:'input值'}
			jc.render(data,"test_cal_4",$("#father6"),function(){
				console.log("father6 OK");
			})
		})

		</script>
	</body>
</html>